//
//  OtherDefine.h
//  TenMinDemo
//
//  Created by Shawn Li on 2021/3/9.
//  Copyright © 2021 CYXiang. All rights reserved.
//

#ifndef OtherDefine_h
#define OtherDefine_h
//
#import <MJExtension.h>
#import "UIImage+ColorImage.h"
#import "UIColor+HexColor.h"
#import <SVProgressHUD.h>
#import "AppDelegate.h"


// 网络
#if DEBUG
#define BaseUrl @"http://46.137.200.64"
//#define BaseUrl @"http://54.64.118.173"
#else
//#define BaseUrl @"http://54.64.118.173"
#define BaseUrl @"http://46.137.200.64"
#endif

#define AppUpdateUrl @"http://d.zqapps.com/p2jr?utm_source=fir&utm_medium=qr"

#define API_GetNewVersionInfo [kAppDelegate.bestProxy stringByAppendingString:@"/data/appServer/rpc/android/version"]


#define API_isRegistered [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/register/isRegistered"]

#define API_sendRegisterPvc [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/register/sendRegisterPvc"]

// 注册
#define API_register [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsMain/pub/account/register"]


// 获取图片验证码
#define API_getGvc [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/common/getGvc"]

// 登录
#define API_passwordLoginCommit [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/login/passwordLoginCommit"]

// 登出
#define API_logout [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/login/logout"]


// 获取登录状态
#define API_passwordLoginLoad [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/login/passwordLoginLoad"]

// 获取登录验证码
#define API_sendPvcForLogin [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/login/sendPvcForLogin"]

// 获取修改资金密码的验证码
#define API_sendResetPayPasswordPvc [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/password/sendResetPayPasswordPvc"]

// 修改资金密码
#define API_resetPayPasswordCommit [kAppDelegate.bestProxy stringByAppendingString:@"/data/passport/pub/password/resetPayPasswordCommit"]


// 获取用户信息
#define API_getUserInfo [NSString stringWithFormat:@"%@/data/hsMain/pub/account/getInfo",kAppDelegate.bestProxy]

// 设置签名
#define API_setSignature [NSString stringWithFormat:@"%@/data/hsMain/pub/account/setSignature",kAppDelegate.bestProxy]

// 设置昵称
#define API_setName [NSString stringWithFormat:@"%@/data/hsMain/pub/account/setName",kAppDelegate.bestProxy]

// 修改登录密码
#define API_modifyPassword [NSString stringWithFormat:@"%@/data/passport/pub/password/modifyPassword",kAppDelegate.bestProxy]

// 找回密码的验证码
#define API_sendResetPasswordPvc [NSString stringWithFormat:@"%@/data/passport/pub/password/sendResetPasswordPvc",kAppDelegate.bestProxy]

// 找回密码
#define API_resetPasswordCommit [NSString stringWithFormat:@"%@/data/passport/pub/password/resetPasswordCommit",kAppDelegate.bestProxy]

// 获取用户头像
#define API_getUserIcon [NSString stringWithFormat:@"%@/data/hsMain/pub/account/getPortrait",kAppDelegate.bestProxy]

// 设置用户头像
#define API_setUserIcon [NSString stringWithFormat:@"%@/data//hsMain/pub/account/uploadPortrait",kAppDelegate.bestProxy]


// 获取资产情况
#define API_getUserAssets [NSString stringWithFormat:@"%@/data/hsWallet/pub/asset/getUserAssets",kAppDelegate.bestProxy]

// 获取资产详情
#define API_getAssetDetail [NSString stringWithFormat:@"%@/data/hsWallet/pub/asset/getAssetDetail",kAppDelegate.bestProxy]

// 获取所有的接口列表
#define API_getProxyListAll [NSString stringWithFormat:@"%@/data/hsResource/pub/proxy/listAll",kAppDelegate.bestProxy]

// 获取所有的接口列表
#define API_getProxySpeed(ip) [NSString stringWithFormat:@"%@/data/ping",(ip)]

// 获取资产交易记录
#define API_getTsfLoglist [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/list"]


// 获取资产转出详情
#define API_getTsfLogSendDetail [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/sendDetail"]

// 获取资产转入详情
#define API_getTsfLogReceiveDetail [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/receiveDetail"]

// 获取转出配置
#define API_getTransferLoad [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/transferLoad"]

// 转出图形验证码
#define API_sendTsfPicVerCode [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/sendTransferGvc"]

// 转出手机验证码
#define API_sendTsfPhoneVerCode [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/sendTransferVilidationCode"]

// 转出
#define API_transferOut [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsWallet/pub/transaction/transfer"]

// 邀请信息
#define API_invitationDetail [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsMain/pub/account/invitationDetail"]

//  根据 key 取图片
#define API_getImageWithKey [kAppDelegate.bestProxy stringByAppendingString:@"/data/hsMain/pub/common/getImage"]





//

#define APPVersionCode [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]

#define MainColor LRRGBColor(24.0,26.0,31.0)
#define TextColor_929acc [UIColor colorWithHexString:@"#929acc"]
#define PlhColor [UIColor colorWithHexString:@"#4d5273"]



#define LoadVCFormXib(VC) [[VC alloc]initWithNibName:NSStringFromClass([VC class]) bundle:nil];

#define kIsBangsScreen ({\
    BOOL isBangsScreen = NO; \
    if (@available(iOS 11.0, *)) { \
    UIWindow *window = [[UIApplication sharedApplication].windows firstObject]; \
    isBangsScreen = window.safeAreaInsets.bottom > 0; \
    } \
    isBangsScreen; \
})

#define kScreenTopMargin (kIsBangsScreen ? 91 : 64)

#pragma mark-

#define LCErrorHUD(msg,delay) [SVProgressHUD dismiss];\
[SVProgressHUD showErrorWithStatus:msg];\
[SVProgressHUD dismissWithDelay:delay];

#define LCInfoHUD(msg,delay) [SVProgressHUD dismiss];\
[SVProgressHUD showInfoWithStatus:msg];\
[SVProgressHUD dismissWithDelay:delay];

#define LCSuccessHUD(msg,delay) [SVProgressHUD dismiss];\
[SVProgressHUD showSuccessWithStatus:msg];\
[SVProgressHUD dismissWithDelay:delay];


#pragma mark-

#define LCPostNotification(name) [[NSNotificationCenter defaultCenter] postNotificationName:name object:nil userInfo:nil];

#define LCNotifiCenter [NSNotificationCenter defaultCenter]


#define LCAttStr(str,font,color) [[NSMutableAttributedString alloc] initWithString:(str) attributes:@{NSFontAttributeName:(font),NSForegroundColorAttributeName:(color)}]

#define kAppDelegate [AppDelegate getAPPDelegate]

#define DefaultUserIcon [UIImage imageNamed:@"user_icon"]

#define LCCopyBoard(str) [UIPasteboard generalPasteboard].string = (str)

#define LCSafeStr(str) ((str && str.length) ? str : @"")


#endif /* OtherDefine_h */
